#ifndef TOTPITEMWIDGET_H
#define TOTPITEMWIDGET_H
#include <QWidget>
#include <QProgressBar>
#include <totp/totp.h>

#include "clickablelable.h"

namespace data_display {
class TOTPItemWidget : public QWidget {
	Q_OBJECT

public:
	TOTPItemWidget(const totp::TOTP& totp, QWidget *parent = nullptr);

	totp::TOTP getTOTP() const;

	void updateProgress();

	QString getPasswrodLabel();

signals:
	void passwordCopied(QString);

	void deleteRequested(const totp::TOTP&);

public slots:
	void sendCopySignal();

	void onDeleteClicked();

private:
	totp::TOTP m_totp;
	QProgressBar *progressBar;
	ClickableLabel *passwordLabel;
	QTimer *timer;
};
}
#endif //TOTPITEMWIDGET_H
